import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    // 主页面
    {
      path: '/',
      name: 'main',
      component: () => import('@/components/HelloWorld')
    },
    // 角色登录路由
    {
      path: '/adminLogin',
      name: 'adminLogin',
      component: () => import('@/views/admin/login/index')
    },
    {
      path: '/teacherLogin',
      name: 'teacherLogin',
      component: () => import('@/views/teacher/login/index')
    },
    {
      path: '/studentLogin',
      name: 'studentLogin',
      component: () => import('@/views/student/login/index')
    },
    {
      path: '/leaderLogin',
      name: 'leaderLogin',
      component: () => import('@/views/leader/login/index')
    },
    {
      path: '/teacherSecretaryLogin',
      name: 'teacherSecretaryLogin',
      component: () => import('@/views/teacherSecretary/login/index')
    },
    //  角色注册路由
    {
      path: '/leaderRegister',
      name: 'leaderRegister',
      component: () => import('@/views/leader/register/index')
    },
    {
      path: '/studentRegister',
      name: 'studentRegister',
      component: () => import('@/views/student/register/index')
    },
    {
      path: '/teacherRegister',
      name: 'teacherRegister',
      component: () => import('@/views/teacher/register/index')
    },
    {
      path: '/teacherSecretaryRegister',
      name: 'teacherSecretaryRegister',
      component: () => import('@/views/teacherSecretary/register/index')
    },
    // 教师登录成功后的路由
    {
      path: '/teacherHome',
      name: 'teacherHome',
      component: () => import('@/views/teacher/home/main')
    },
    // 教师端个功能路由
    {
      path: '/teacherAddStudent',
      name: 'teacherAddStudent',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/student/addStudent')
    },
    {
      path: '/teacherStudentList',
      name: 'teacherStudentList',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/student/studentList')
    },
    {
      path: '/teacherCourseList',
      name: 'teacherCourseList',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/course/courseList')
    },
    {
      path: '/teacherAddCourse',
      name: 'teacherAddCourse',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/course/addCourse')
    },
    {
      path: '/teacherTaskList',
      name: 'teacherTaskList',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/task/taskList')
    },
    {
      path: '/teacherAddTask',
      name: 'teacherAddTask',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/task/addTask')
    },
    {
      path: '/teacherAddClass',
      name: 'teacherAddTask',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/class/addClass')
    },
    {
      path: '/teacherClassList',
      name: 'teacherClassList',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/class/classList')
    },
    {
      path: '/teacherPeopleInfo',
      name: 'teacherPeopleInfo',
      component: () => import('@/views/teacher/home/info')
    },
    // 学生登录成功后展示的页面
    {
      path: '/studentHome',
      name: 'studentHome',
      component: () => import('@/views/student/home/main')
    },
    // 学生端各个功能路由
    {
      path: '/studentAllClassroom',
      name: 'studentAllClassroom',
      component: () => import('@/views/student/classroom/allClassroom')
    },
    {
      path: '/studentSelectedClassroom',
      name: 'studentSelectedClassroom',
      component: () => import('@/views/student/classroom/selectedClassroom')
    },
    {
      path: '/studentAllCourse',
      name: 'studentAllCourse',
      component: () => import('@/views/student/course/allCourse')
    },
    {
      path: '/studentSelectedCourse',
      name: 'studentSelectedCourse',
      component: () => import('@/views/student/course/selectedCourse')
    },
    {
      path: '/studentAllTask',
      name: 'studentAllTask',
      component: () => import('@/views/student/task/allTask')
    },
    {
      path: '/studentTaskAchievement',
      name: 'studentTaskAchievement',
      component: () => import('@/views/student/task/taskAchievement')
    },
    {
      path: '/studentPeopleInfo',
      name: 'studentPeopleInfo',
      component: () => import('@/views/student/home/info')
    },
    {
      path: '/teacherStudentAgeAnalysis',
      name: 'teacherStudentAgeAnalysis',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/student/studentAge')
    },
    {
      path: '/teacherCourseCreditAnalysis',
      name: 'teacherCourseCreditAnalysis',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/course/courseCredit')
    },
    {
      path: '/teacherTaskSubmitAnalysis',
      name: 'teacherTaskSubmitAnalysis',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/teacher/task/submit')
    },
    {
      path: '/studentTaskAchievementAnalysis',
      name: 'studentTaskAchievementAnalysis',
      meta: {
        requireShiro: true
      },
      component: () => import('@/views/student/task/achievementAnalysis')
    },
    {
      path: '/empty',
      name: 'empty',
      component: () => import('@/views/teacher/empty')
    },
    {
      path: '/adminHome',
      name: 'adminHome',
      component: () => import('@/views/admin/home/main')
    },
    {
      path: '/leaderPersonnel',
      name: 'leaderPersonnel',
      component: () => import('@/views/admin/personnel-matters/leader')
    },
    {
      path: '/studentPersonnel',
      name: 'studentPersonnel',
      component: () => import('@/views/admin/personnel-matters/student')
    },
    {
      path: '/teacherPersonnel',
      name: 'teacherPersonnel',
      component: () => import('@/views/admin/personnel-matters/teacher')
    },
    {
      path: '/teachingSecretaryPersonnel',
      name: 'teachingSecretaryPersonnel',
      component: () => import('@/views/admin/personnel-matters/teacherSecretary')
    },
    {
      path: '/teacherAuthority',
      name: 'teacherAuthority',
      component: () => import('@/views/admin/jurisdiction/teacher')
    },
    {
      path: '/studentAuthority',
      name: 'studentAuthority',
      component: () => import('@/views/admin/jurisdiction/student')
    }
  ]
})
